<?php

class HIterator extends FilterIterator
{
    private $seek;
    public function __construct(Iterator $iterator , $seek )
    {
        parent::__construct($iterator);
        $this->seek = $seek;
    }
    
    public function accept()
    {
        $data = $this->getInnerIterator()->current();
        return ( $data['parent'] == $this->seek );
    }
}
